package com.atguigu.boot.controller;

import com.atguigu.boot.bean.Actor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/actorinfo")
public class ActorController {
    @Autowired
    private  Actor actor;
//    private Student student;


   @Value("${server.port}")
    private String port;


    @RequestMapping("/name")
    public String getName(){
        return "zhangsan";
    }
    @RequestMapping("/port")
    public  String  getPort(){
        return port;
    }
    @RequestMapping("/info")
    public Actor getActor(){
        return actor;
    }
}
